import axios from '~/axios'

// 添加补贴申请
export function addSubsidyApplicationApi(data) {
    return axios.post('/basic/lindi/subsidyApplication/addSubsidyApplication', data)
}

// 删除补贴申请
export function deleteSubsidyApplicationBySubsidyApplicationIdApi(subsidyApplicationId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/subsidyApplication/deleteSubsidyApplicationBySubsidyApplicationId',
        params: {
            subsidyApplicationId: subsidyApplicationId
        }
    })
}

// 修改补贴申请
export function updateSubsidyApplicationBySubsidyApplicationIdApi(data) {
    return axios.put('/basic/lindi/subsidyApplication/updateSubsidyApplicationBySubsidyApplicationId', data)
}

// 分页查询补贴申请列表
export function getPageSubsidyApplicationListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/subsidyApplication/getPageSubsidyApplicationList',
        params: params
    })
}

// 根据ID查询补贴申请详情
export function getSubsidyApplicationBySubsidyApplicationIdApi(subsidyApplicationId) {
    return axios.get(`/basic/lindi/subsidyApplication/getSubsidyApplicationBySubsidyApplicationId/${subsidyApplicationId}`)
}

// 根据文件ID删除补贴申请文件
export function deleteSubsidyApplicationFileByFileIdApi(fileId) {
    return axios({
        method: 'POST',
        url: '/basic/lindi/subsidyApplication/deleteSubsidyApplicationFileByFileId',
        params: {
            fileId: fileId
        }
    })
}